package neu.soft.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import neu.soft.config.JacksonStatusEnumDeserializer;
import neu.soft.constant.OrderStatus;
import neu.soft.constant.TaskOrderStatus;
import neu.soft.constant.OrderType;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author 邢乐
 * 普通订单  type类型包含退、换、缺货单
 * **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class NormalOrder {

    private String oid;
    @JsonDeserialize(using = JacksonStatusEnumDeserializer.class)
    private OrderStatus status;//订单状态  1.可分配订单 2.库房出库订单 3.配送站到货订单 4.已分配订单 5.已领货订单 6.已完成订单 7.无效订单
    private OrderType type;//订单类型    1.普通配送订单 2.换货单 3.退货单 4.que货单
    private String recv;
    private String loc;
    private String tele;
    private BigDecimal totalPay;
    List<NormalOrderInfo>shoppingList ;
    List<NormalOrderInfo>newShoppingList ;
    private String receiptInfo;//收据信息
    private String note;//备注
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date arriveTime;//预计到达时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date buyTime;//预计到达时间
}
